import request from '@/utils/request'

export function listVersion(params) {
  return request({
    url: '/admin/version/list',
    method: 'get',
    params
  })
}

export function infoVersion(user_id) {
  return request({
    url: `/admin/version/info/${user_id}`,
    method: 'get'
  })
}

export function addVersion(data) {
  return request({
    url: '/admin/version/create',
    method: 'post',
    data
  })
}

export function delVersion(user_id) {
  return request({
    url: `/admin/version/delete/${user_id}`,
    method: 'post'
  })
}

export function updateVersion(user_id, data) {
  return request({
    url: `/admin/version/update/${user_id}`,
    method: 'post',
    data
  })
}

export function uploadApk(data) {
  return request({
    url: '/admin/uploadApk',
    method: 'post',
    data
  })
}
